3.12.20 \(\int \frac {(d+e x^2) (a+b \text {ArcTan}(c x))}{x^3} \, dx\) [1120]

Optimal. Leaf size=77 \[ -\frac {b c d}{2 x}-\frac {1}{2} b c^2 d \text {ArcTan}(c x)-\frac {d (a+b \text {ArcTan}(c x))}{2 x^2}+a e \log (x)+\frac {1}{2} i b e \text {PolyLog}(2,-i c x)-\frac {1}{2} i b e \text {PolyLog}(2,i c x) \]

[Out]

-1/2*b*c*d/x-1/2*b*c^2*d*arctan(c*x)-1/2*d*(a+b*arctan(c*x))/x^2+a*e*ln(x)+1/2*I*b*e*polylog(2,-I*c*x)-1/2*I*b
*e*polylog(2,I*c*x)

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 77, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {5100, 4946, 331, 209, 4940, 2438} \begin {gather*} -\frac {d (a+b \text {ArcTan}(c x))}{2 x^2}+a e \log (x)-\frac {1}{2} b c^2 d \text {ArcTan}(c x)-\frac {b c d}{2 x}+\frac {1}{2} i b e \text {Li}_2(-i c x)-\frac {1}{2} i b e \text {Li}_2(i c x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((d + e*x^2)*(a + b*ArcTan[c*x]))/x^3,x]

[Out]

-1/2*(b*c*d)/x - (b*c^2*d*ArcTan[c*x])/2 - (d*(a + b*ArcTan[c*x]))/(2*x^2) + a*e*Log[x] + (I/2)*b*e*PolyLog[2,
 (-I)*c*x] - (I/2)*b*e*PolyLog[2, I*c*x]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 331

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*c
*(m + 1))), x] - Dist[b*((m + n*(p + 1) + 1)/(a*c^n*(m + 1))), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4940

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[I*(b/2), Int[Log[1 - I*c*x
]/x, x], x] - Dist[I*(b/2), Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rule 5100

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With
[{u = ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x^2)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b,
 c, d, e, f, m}, x] && IntegerQ[q] && IGtQ[p, 0] && ((EqQ[p, 1] && GtQ[q, 0]) || IntegerQ[m])

Rubi steps

\begin {align*} \int \frac {\left (d+e x^2\right ) \left (a+b \tan ^{-1}(c x)\right )}{x^3} \, dx &=\int \left (\frac {d \left (a+b \tan ^{-1}(c x)\right )}{x^3}+\frac {e \left (a+b \tan ^{-1}(c x)\right )}{x}\right ) \, dx\\ &=d \int \frac {a+b \tan ^{-1}(c x)}{x^3} \, dx+e \int \frac {a+b \tan ^{-1}(c x)}{x} \, dx\\ &=-\frac {d \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}+a e \log (x)+\frac {1}{2} (b c d) \int \frac {1}{x^2 \left (1+c^2 x^2\right )} \, dx+\frac {1}{2} (i b e) \int \frac {\log (1-i c x)}{x} \, dx-\frac {1}{2} (i b e) \int \frac {\log (1+i c x)}{x} \, dx\\ &=-\frac {b c d}{2 x}-\frac {d \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}+a e \log (x)+\frac {1}{2} i b e \text {Li}_2(-i c x)-\frac {1}{2} i b e \text {Li}_2(i c x)-\frac {1}{2} \left (b c^3 d\right ) \int \frac {1}{1+c^2 x^2} \, dx\\ &=-\frac {b c d}{2 x}-\frac {1}{2} b c^2 d \tan ^{-1}(c x)-\frac {d \left (a+b \tan ^{-1}(c x)\right )}{2 x^2}+a e \log (x)+\frac {1}{2} i b e \text {Li}_2(-i c x)-\frac {1}{2} i b e \text {Li}_2(i c x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
time = 0.01, size = 86, normalized size = 1.12 \begin {gather*} -\frac {a d}{2 x^2}-\frac {b d \text {ArcTan}(c x)}{2 x^2}-\frac {b c d \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};-c^2 x^2\right )}{2 x}+a e \log (x)+\frac {1}{2} i b e \text {PolyLog}(2,-i c x)-\frac {1}{2} i b e \text {PolyLog}(2,i c x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^2)*(a + b*ArcTan[c*x]))/x^3,x]

[Out]

-1/2*(a*d)/x^2 - (b*d*ArcTan[c*x])/(2*x^2) - (b*c*d*Hypergeometric2F1[-1/2, 1, 1/2, -(c^2*x^2)])/(2*x) + a*e*L
og[x] + (I/2)*b*e*PolyLog[2, (-I)*c*x] - (I/2)*b*e*PolyLog[2, I*c*x]

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 143 vs. \(2 (63 ) = 126\).
time = 0.08, size = 144, normalized size = 1.87

method result size
risch \(\frac {i c^{2} b d \ln \left (-i c x \right )}{4}-\frac {b c d}{2 x}-\frac {b \,c^{2} d \arctan \left (c x \right )}{2}-\frac {i b d \ln \left (-i c x +1\right )}{4 x^{2}}-\frac {i b \dilog \left (-i c x +1\right ) e}{2}-\frac {a d}{2 x^{2}}+a e \ln \left (-i c x \right )-\frac {i b \,c^{2} d \ln \left (i c x \right )}{4}+\frac {i b d \ln \left (i c x +1\right )}{4 x^{2}}+\frac {i b \dilog \left (i c x +1\right ) e}{2}\) \(123\)
derivativedivides \(c^{2} \left (-\frac {a d}{2 c^{2} x^{2}}+\frac {a e \ln \left (c x \right )}{c^{2}}-\frac {b \arctan \left (c x \right ) d}{2 c^{2} x^{2}}+\frac {b \arctan \left (c x \right ) e \ln \left (c x \right )}{c^{2}}+\frac {i b e \ln \left (c x \right ) \ln \left (i c x +1\right )}{2 c^{2}}-\frac {i b e \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2 c^{2}}-\frac {i b e \dilog \left (-i c x +1\right )}{2 c^{2}}+\frac {i b e \dilog \left (i c x +1\right )}{2 c^{2}}-\frac {\arctan \left (c x \right ) b d}{2}-\frac {b d}{2 c x}\right )\) \(144\)
default \(c^{2} \left (-\frac {a d}{2 c^{2} x^{2}}+\frac {a e \ln \left (c x \right )}{c^{2}}-\frac {b \arctan \left (c x \right ) d}{2 c^{2} x^{2}}+\frac {b \arctan \left (c x \right ) e \ln \left (c x \right )}{c^{2}}+\frac {i b e \ln \left (c x \right ) \ln \left (i c x +1\right )}{2 c^{2}}-\frac {i b e \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2 c^{2}}-\frac {i b e \dilog \left (-i c x +1\right )}{2 c^{2}}+\frac {i b e \dilog \left (i c x +1\right )}{2 c^{2}}-\frac {\arctan \left (c x \right ) b d}{2}-\frac {b d}{2 c x}\right )\) \(144\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x^2+d)*(a+b*arctan(c*x))/x^3,x,method=_RETURNVERBOSE)

[Out]

c^2*(-1/2*a*d/c^2/x^2+a/c^2*e*ln(c*x)-1/2*b*arctan(c*x)*d/c^2/x^2+b/c^2*arctan(c*x)*e*ln(c*x)+1/2*I*b/c^2*e*ln
(c*x)*ln(1+I*c*x)-1/2*I*b/c^2*e*ln(c*x)*ln(1-I*c*x)-1/2*I*b/c^2*e*dilog(1-I*c*x)+1/2*I*b/c^2*e*dilog(1+I*c*x)-
1/2*arctan(c*x)*b*d-1/2*b*d/c/x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*arctan(c*x))/x^3,x, algorithm="maxima")

[Out]

-1/2*((c*arctan(c*x) + 1/x)*c + arctan(c*x)/x^2)*b*d + b*e*integrate(arctan(c*x)/x, x) + a*e*log(x) - 1/2*a*d/
x^2

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*arctan(c*x))/x^3,x, algorithm="fricas")

[Out]

integral((a*x^2*e + a*d + (b*x^2*e + b*d)*arctan(c*x))/x^3, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \operatorname {atan}{\left (c x \right )}\right ) \left (d + e x^{2}\right )}{x^{3}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x**2+d)*(a+b*atan(c*x))/x**3,x)

[Out]

Integral((a + b*atan(c*x))*(d + e*x**2)/x**3, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*arctan(c*x))/x^3,x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

Mupad [B]
time = 0.72, size = 91, normalized size = 1.18 \begin {gather*} \left \{\begin {array}{cl} a\,e\,\ln \left (x\right )-\frac {a\,d}{2\,x^2} & \text {\ if\ \ }c=0\\ a\,e\,\ln \left (x\right )-\frac {a\,d}{2\,x^2}-\frac {b\,d\,\mathrm {atan}\left (c\,x\right )}{2\,x^2}-\frac {b\,d\,\left (c^3\,\mathrm {atan}\left (c\,x\right )+\frac {c^2}{x}\right )}{2\,c}-\frac {b\,e\,\left ({\mathrm {Li}}_{\mathrm {2}}\left (1-c\,x\,1{}\mathrm {i}\right )-{\mathrm {Li}}_{\mathrm {2}}\left (1+c\,x\,1{}\mathrm {i}\right )\right )\,1{}\mathrm {i}}{2} & \text {\ if\ \ }c\neq 0 \end {array}\right . \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*atan(c*x))*(d + e*x^2))/x^3,x)

[Out]

piecewise(c == 0, a*e*log(x) - (a*d)/(2*x^2), c ~= 0, a*e*log(x) - (b*e*(dilog(- c*x*1i + 1) - dilog(c*x*1i +
1))*1i)/2 - (a*d)/(2*x^2) - (b*d*atan(c*x))/(2*x^2) - (b*d*(c^3*atan(c*x) + c^2/x))/(2*c))

________________________________________________________________________________________